package com.party.core.model.copartner;

import com.party.core.model.BaseModel;

import java.util.Objects;

/**
 * @Author: hqh.
 * @Description: 目标与合伙人关联表(二级)
 * @Date:Created in 2018/10/11 0023 下午 15:13.
 */
public class CopartnerLevel extends BaseModel {

    //会员编号
    private String memberId;
    //上级会员编号
    private String parentId; // 合伙人id
    //会员编号集合
    private String parentIds; // 创建者id
    private Integer lowerNum; //下级人数
    private Float myCommission; //我的佣金



    public CopartnerLevel() {
    }

    public CopartnerLevel(String memberId, String parentId, String parentIds, Integer lowerNum) {
        this.memberId = memberId;
        this.parentId = parentId;
        this.parentIds = parentIds;
        this.lowerNum = lowerNum;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentIds() {
        return parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public Integer getLowerNum() {
        return lowerNum;
    }

    public void setLowerNum(Integer lowerNum) {
        this.lowerNum = lowerNum;
    }

    public Float getMyCommission() {
        return myCommission;
    }

    public void setMyCommission(Float myCommission) {
        this.myCommission = myCommission;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CopartnerLevel that = (CopartnerLevel) o;
        return Objects.equals(memberId, that.memberId) &&
                Objects.equals(parentId, that.parentId) &&
                Objects.equals(parentIds, that.parentIds) &&
                Objects.equals(lowerNum, that.lowerNum) &&
                Objects.equals(myCommission, that.myCommission);
    }

    @Override
    public int hashCode() {

        return Objects.hash(super.hashCode(), memberId, parentId, parentIds, lowerNum, myCommission);
    }

    @Override
    public String toString() {
        return "CopartnerLevel{" +
                "memberId='" + memberId + '\'' +
                ", parentId='" + parentId + '\'' +
                ", parentIds='" + parentIds + '\'' +
                ", lowerNum=" + lowerNum +
                ", myCommission=" + myCommission +
                '}';
    }
}
